<!--
Copyright (c) 2010, Anoop Ramanujam. thaayam.com
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of thaayam.com nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<title>Thaayam - game of Kerala</title>
<script src="jquery.js"></script>
<style type="text/css">
.spColumn { position:absolute; width:45px; height: 45px}
.spBlock { font-weight:bold;}
.spSpecial { border:2px solid red; }
.spNormal { border:1px solid black; }
.spSelected { border:2px solid blue; }

.blYellow { background-color: yellow; }
.blBlue { background-color: #7777FF; }
.blSaffron { background-color: #FF9933; }
.blGreen { background-color: green; }
.blSelected { border:2px solid black; }

.uline { cursor:pointer; text-decoration:underline }
.pointer { cursor:pointer; }

#divThrows { font-size:2.4em; }
#helpmain { position:absolute; top: 50px; left:650px; width:300px; float:right; padding:3px; }
#footer { position:absolute; top: 750px; left:0px; padding: 5px;}
</style>
<script src="Column.js"></script>
<script src="Block.js"></script>
<script src="common.js"></script>
<script src="main.js"></script>
<body>
<br/>
 <!-- <input type="text" id="idName" name="txtName" value="0"> -->
 Test Version. <a href="http://code.google.com/p/thaayam/issues/list">Report issue</a>.
 <span id="spThrow">
<input type="button" id="idMove" name="txtMove" value="Throw" onClick="$('#divThrows').empty();generateThrow()">
</span>

<div id="divThrows"> 	 
</div>
<div id="helpmain">
No. of players: 
<input type="radio" name="radPlayers" value="2" onClick="return choosePlayers(this.value)" checked>2
<input type="radio" name="radPlayers" value="3" onClick="return choosePlayers(this.value)">3
<input type="radio" name="radPlayers" value="4" onClick="return choosePlayers(this.value)">4
<br/>
Mode: 
<input type="radio" name="radMode" value="0" onClick="return changeMode(this.value)" checked>Normal
<input type="radio" name="radMode" value="1" onClick="return changeMode(this.value)">Manual
<br/>

	<span id="iHelpMenu" class="uline" onClick="toggleMenu()">Hide help</span>
	<span id="helper">
		<ul>
			<b>Rules</b>
			<li>Objective is to move all four pieces from the home to the central cell</li>
			<li>The pieces move anti-clockwise in outer square and clockwise in inner square</li>
			<li>You need a 1 to enter the playfield</li>
			<li>1,4 or 8 gives extra throw</li>
			<li>If a player occupies a cell already occupied by an opponent piece, the latter is 'sent home', and player gets an extra throw</li>
			<b>How to play</b>
			<li>First player clicks the <b>Throw</b> button</li>
			<li>His throw number is indicated. Next throw is automatically done in case of 1, 4, or 8</li>
			<li>First player clicks any of his pieces, and click the throw number by which he intends to move his piece</li>
			<li>If there is another player piece already occupying his 'landing', the latter is sent home and throw automatically taken</li>
			<li>On reaching central cell, it disappers!</li>
			<b>Manual moves</b>
			<li>You can undo any move by manual moves. Choose Manual mode</li>
			<li>To move manually, click on any piece and click inside the cell to which this piece should be moved</li>
		</ul>
	</span>
</div>	
<div id="footer">
Thaayam - game of Kerala. Version 0.22a.<br/>
 <a href="http://thaayam.com">thaayam.com</a>
</div>
</body>